package com.dabai.simpleconnection_udp.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.dabai.simpleconnection_udp.R;
import com.dabai.simpleconnection_udp.bean.UdpMsgModel;

import java.util.ArrayList;

/**
 * Description : Other
 *
 * @author BAI
 */
public class UdpMsgAdapter extends BaseQuickAdapter<UdpMsgModel, BaseViewHolder> {


    public UdpMsgAdapter(ArrayList<UdpMsgModel> smallProgramInfos) {
        super(R.layout.item_udp_msg, smallProgramInfos);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, UdpMsgModel udpMsgModel) {


        baseViewHolder.setText(R.id.textView_name,udpMsgModel.getName());
        baseViewHolder.setText(R.id.textView_port,String.valueOf(udpMsgModel.getPort()));
        baseViewHolder.setText(R.id.textView_content,udpMsgModel.getContent());
        baseViewHolder.setText(R.id.textView_ip,udpMsgModel.getIp());
        baseViewHolder.setText(R.id.chip4,udpMsgModel.isMode());



    }
}